package com.fdb.efp.nls.service.dao;

import com.fdb.efp.nls.service.domain.SUserDuty;
import com.fdb.efp.nls.service.vo.SUserOrgByDutyIdVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>DAO interface:系统用户岗位表				<p>
 * @author chenqm1
 * @date 2018-05-03
 */
public interface SUserDutyDao {
	
	public int insertSUserDuty(SUserDuty sUserDuty);
	
	public int deleteByPk(SUserDuty sUserDuty);
	public int deleteByUser(SUserDuty sUserDuty);

	public int updateByPk(SUserDuty sUserDuty);
	
	public SUserDuty queryByPk(SUserDuty sUserDuty);

	public List<SUserDuty> queryList(SUserDuty sUserDuty);
	public List<SUserOrgByDutyIdVO> queryLegalUserByDutyIdLeagalId(@Param("sDutyCode") String sDutyCode, @Param("orgCode") String orgCode);
	public List<SUserOrgByDutyIdVO> queryOrgUserByDutyIdOrgId(@Param("sDutyCode") String sDutyCode, @Param("orgCode") String orgCode);

	public List<String> queryDuty(String sUserCode);
	
	public List<SUserDuty> queryAllOwnerByPage(SUserDuty sUserDuty);
	
	/**
	 * 查询当前岗位下的所有用户
	 * @return
	 */
	public List<SUserOrgByDutyIdVO> queryUsersByDuty(@Param("dutyCode") String dutyCode);
}